﻿@model IEnumerable<Core.Models.ActionLink>

@{
    ViewBag.Title = "Admin";
    Layout = ((Core.Models.Theme)Session["Theme"]).Layout;
    object linkid;
}

<h2>Administration</h2>
<p></p>
<p>
@{
    foreach(Core.Models.ActionLink link in Model)
    {
        object routeValues = new{area = ""};
        if((!link.Id.Equals(Guid.Empty)) && (!(link.Area == null)))
        {
            routeValues = new {area = link.Area, id = link.Id.ToString()};
        }
        else
        { 
            if (!link.Id.Equals(Guid.Empty))
            {
                routeValues = new {area = "", id = link.Id.ToString()};
            }
            if (!(link.Area == null))
            {
                routeValues = new {area = link.Area};
            }
        }
        @Html.ActionLink(link.LinkText, link.ActionName, link.ControllerName,routeValues,null);<br />            
    }
}
</p>
